<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>17. Anhang &mdash; PowerShell fuer Systemintegratoren</title>
    
    <link rel="stylesheet" href="_static/sphinxdoc.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '1.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="_static/translations.js"></script>
    <link rel="top" title="PowerShell fuer Systemintegratoren" href="index.html" />
    <link rel="next" title="18. PowerShell für ActiveDirectory" href="powershell_activedirectory.html" />
    <link rel="prev" title="16. Fehlerbehandlung" href="powershell_fehlerbehandlung.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="Allgemeiner Index"
             accesskey="I">Index</a></li>
        <li class="right" >
          <a href="powershell_activedirectory.html" title="18. PowerShell für ActiveDirectory"
             accesskey="N">weiter</a> |</li>
        <li class="right" >
          <a href="powershell_fehlerbehandlung.html" title="16. Fehlerbehandlung"
             accesskey="P">zurück</a> |</li>
        <li><a href="index.html">PS4SYS</a> &raquo;</li> 
      </ul>
    </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="index.html">
              <img class="logo" src="_static/PowerShell_icon_small.png" alt="Logo"/>
            </a></p>
  <h3><a href="index.html">Inhalt</a></h3>
  <ul>
<li><a class="reference internal" href="#">17. Anhang</a><ul>
<li><a class="reference internal" href="#links">17.1. Links</a></li>
<li><a class="reference internal" href="#powershell-variablen">17.2. Powershell-Variablen</a></li>
<li><a class="reference internal" href="#vergleichsoperatoren">17.3. Vergleichsoperatoren</a></li>
<li><a class="reference internal" href="#logische-operatoren">17.4. Logische Operatoren</a></li>
<li><a class="reference internal" href="#mathematische-operatoren">17.5. Mathematische Operatoren</a></li>
<li><a class="reference internal" href="#powershell-datentypen">17.6. Powershell-Datentypen</a></li>
<li><a class="reference internal" href="#schleifen">17.7. Schleifen</a><ul>
<li><a class="reference internal" href="#for">17.7.1. for</a></li>
<li><a class="reference internal" href="#do-while">17.7.2. do - while</a></li>
<li><a class="reference internal" href="#do-until">17.7.3. do - until</a></li>
</ul>
</li>
<li><a class="reference internal" href="#auswahl">17.8. Auswahl</a><ul>
<li><a class="reference internal" href="#if-elseif">17.8.1. if-elseif</a></li>
<li><a class="reference internal" href="#switch">17.8.2. switch</a></li>
</ul>
</li>
<li><a class="reference internal" href="#darstellungsmoglichkeiten">17.9. Darstellungsmöglichkeiten</a></li>
<li><a class="reference internal" href="#programmablaufplan">17.10. Programmablaufplan</a></li>
<li><a class="reference internal" href="#struktogramm">17.11. Struktogramm</a></li>
</ul>
</li>
</ul>

  <h4>Vorheriges Thema</h4>
  <p class="topless"><a href="powershell_fehlerbehandlung.html"
                        title="vorheriges Kapitel">16. Fehlerbehandlung</a></p>
  <h4>Nächstes Thema</h4>
  <p class="topless"><a href="powershell_activedirectory.html"
                        title="nächstes Kapitel">18. PowerShell für ActiveDirectory</a></p>
  <h3>Diese Seite</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/powershell_anhang_1.txt"
           rel="nofollow">Quelltext anzeigen</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Schnellsuche</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Los" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Geben Sie Suchbegriffe oder einen Modul-, Klassen- oder Funktionsnamen ein.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="anhang">
<h1>17. Anhang<a class="headerlink" href="#anhang" title="Permalink zu dieser Überschrift">¶</a></h1>
<div class="section" id="links">
<span id="urls"></span><h2>17.1. Links<a class="headerlink" href="#links" title="Permalink zu dieser Überschrift">¶</a></h2>
<blockquote>
<div><ul class="simple">
<li><a class="reference external" href="http://www.it-visions.de/scripting/powershell/PowerShellCodeBeispiele.aspx">http://www.it-visions.de/scripting/powershell/PowerShellCodeBeispiele.aspx</a></li>
</ul>
</div></blockquote>
</div>
<div class="section" id="powershell-variablen">
<span id="id1"></span><h2>17.2. Powershell-Variablen<a class="headerlink" href="#powershell-variablen" title="Permalink zu dieser Überschrift">¶</a></h2>
<table border="1" class="docutils">
<colgroup>
<col width="13%" />
<col width="87%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Variable</th>
<th class="head">Bedeutung</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>$^</td>
<td>Contains the first token of the last line input into the shell</td>
</tr>
<tr class="row-odd"><td>$$</td>
<td>Contains the last token of the last line input into the shell</td>
</tr>
<tr class="row-even"><td>$_</td>
<td>The current pipeline object; used in script blocks, filters, Where-Object, ForEach-Object, and Switch</td>
</tr>
<tr class="row-odd"><td>$?</td>
<td>Contains the success/fail status of the last statement</td>
</tr>
<tr class="row-even"><td>$Args</td>
<td>Used in creating functions requiring parameters</td>
</tr>
<tr class="row-odd"><td>$Error</td>
<td>If an error occurred, the error object is saved in the $error variable.</td>
</tr>
<tr class="row-even"><td>$ExecutionContext</td>
<td>The execution objects available to cmdlets</td>
</tr>
<tr class="row-odd"><td>$foreach</td>
<td>Refers to the enumerator in a foreach loop</td>
</tr>
<tr class="row-even"><td>$HOME</td>
<td>The user&#8217;s home directory; set to %HOMEDRIVE%%HOMEPATH%</td>
</tr>
<tr class="row-odd"><td>$Input</td>
<td>Input is piped to a function or code block.</td>
</tr>
<tr class="row-even"><td>$Match</td>
<td>A hash table consisting of items found by the -match operator</td>
</tr>
<tr class="row-odd"><td>$MyInvocation</td>
<td>Information about the currently executing script or command-line</td>
</tr>
<tr class="row-even"><td>$PSHome</td>
<td>The directory where PS is installed</td>
</tr>
<tr class="row-odd"><td>$Host</td>
<td>Information about the currently executing host</td>
</tr>
<tr class="row-even"><td>$LastExitCode</td>
<td>The exit code of the last native application to run</td>
</tr>
<tr class="row-odd"><td>$true</td>
<td>Boolean TRUE</td>
</tr>
<tr class="row-even"><td>$false</td>
<td>Boolean FALSE</td>
</tr>
<tr class="row-odd"><td>$null</td>
<td>A null object</td>
</tr>
<tr class="row-even"><td>$this</td>
<td>In the Types.ps1xml file and some script block instances, this represents the current object</td>
</tr>
<tr class="row-odd"><td>$OFS</td>
<td>Output Field Separator used when converting an array to a string</td>
</tr>
<tr class="row-even"><td>$ShellID</td>
<td>The identifier for the shell. This value is used by the shell to determine the ExecutionPolicy and what profiles are run at Startup</td>
</tr>
<tr class="row-odd"><td>$StackTrace</td>
<td>Contains detailed stack trace information about the last error</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="vergleichsoperatoren">
<span id="vergleichsoperator"></span><h2>17.3. Vergleichsoperatoren<a class="headerlink" href="#vergleichsoperatoren" title="Permalink zu dieser Überschrift">¶</a></h2>
<table border="1" class="docutils">
<colgroup>
<col width="22%" />
<col width="13%" />
<col width="21%" />
<col width="25%" />
<col width="19%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Operator</th>
<th class="head">klassisch</th>
<th class="head">Beschreibung</th>
<th class="head">Beispiel</th>
<th class="head">Ergebnis</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>-eq,-ceq, -ieq</td>
<td>=</td>
<td>Gleichheit</td>
<td>10 -eq 15</td>
<td>$true</td>
</tr>
<tr class="row-odd"><td>-ne, -cne, -ice</td>
<td>&lt;&gt;</td>
<td>Ungleichheit</td>
<td>10 -ne 15</td>
<td>$true</td>
</tr>
<tr class="row-even"><td>-gt,-cgt, -igt</td>
<td>&gt;</td>
<td>Größer</td>
<td>10 -gt 15</td>
<td>$false</td>
</tr>
<tr class="row-odd"><td>-ge,-cge, -ige</td>
<td>&gt;=</td>
<td>Größer gleich</td>
<td>10 -ge 15</td>
<td>$false</td>
</tr>
<tr class="row-even"><td>-lt,-clt, -ilt</td>
<td>&lt;</td>
<td>Kleiner</td>
<td>10 -lt 15</td>
<td>$true</td>
</tr>
<tr class="row-odd"><td>-le,-cle, -ile</td>
<td>&lt;=</td>
<td>Kleiner gleich</td>
<td>10 -le 15</td>
<td>$true</td>
</tr>
<tr class="row-even"><td>-contains <a class="footnote-reference" href="#id7" id="id2">[1]</a></td>
<td>&nbsp;</td>
<td>Enthält</td>
<td>1,2,3 -contains 1</td>
<td>$true</td>
</tr>
<tr class="row-odd"><td>-notcontains</td>
<td>&nbsp;</td>
<td>Nicht enthält</td>
<td>1,2,3 -notcontains 1</td>
<td>$false</td>
</tr>
<tr class="row-even"><td>-is</td>
<td>&nbsp;</td>
<td>Typgleichheit</td>
<td>$feld -is [array]</td>
<td>$true</td>
</tr>
<tr class="row-odd"><td>-like</td>
<td>&nbsp;</td>
<td>Wildcard</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td>-notlike</td>
<td>&nbsp;</td>
<td>Wildcard</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td>-match</td>
<td>&nbsp;</td>
<td>regulärer Ausdruck</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td>-notmatch</td>
<td>&nbsp;</td>
<td>regulärer Ausdruck</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="logische-operatoren">
<span id="logischeoperatoren"></span><h2>17.4. Logische Operatoren<a class="headerlink" href="#logische-operatoren" title="Permalink zu dieser Überschrift">¶</a></h2>
<img alt="_images/logical_operators.jpg" src="_images/logical_operators.jpg" />
</div>
<div class="section" id="mathematische-operatoren">
<span id="mathematischeoperatoren"></span><h2>17.5. Mathematische Operatoren<a class="headerlink" href="#mathematische-operatoren" title="Permalink zu dieser Überschrift">¶</a></h2>
<p>Es gelten folgende Voraussetzungen</p>
<div class="highlight-sh"><div class="highlight"><pre>PS&gt; <span class="nv">$a</span> <span class="o">=</span> 10
    <span class="nv">$b</span> <span class="o">=</span> 15
</pre></div>
</div>
<table border="1" class="docutils">
<colgroup>
<col width="28%" />
<col width="16%" />
<col width="31%" />
<col width="24%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Operator</th>
<th class="head">klassisch</th>
<th class="head">Beispiel</th>
<th class="head">Ergebnis</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>Addition</td>
<td>+</td>
<td>$a + $b</td>
<td>25</td>
</tr>
<tr class="row-odd"><td>Division</td>
<td>-</td>
<td>$a - $b</td>
<td>-5</td>
</tr>
<tr class="row-even"><td>Multiplikation</td>
<td>*</td>
<td>$a * $b</td>
<td>$false</td>
</tr>
<tr class="row-odd"><td>Modulo <a class="footnote-reference" href="#id8" id="id3">[2]</a></td>
<td>%</td>
<td>$a % 3</td>
<td>1</td>
</tr>
<tr class="row-even"><td>Increment</td>
<td>++</td>
<td>$a++</td>
<td>11</td>
</tr>
<tr class="row-odd"><td>Decrement</td>
<td>- -</td>
<td>$b- -</td>
<td>14</td>
</tr>
</tbody>
</table>
<img alt="_images/arithmetic_operator.png" src="_images/arithmetic_operator.png" />
</div>
<div class="section" id="powershell-datentypen">
<span id="id4"></span><h2>17.6. Powershell-Datentypen<a class="headerlink" href="#powershell-datentypen" title="Permalink zu dieser Überschrift">¶</a></h2>
<table border="1" class="docutils">
<colgroup>
<col width="19%" />
<col width="41%" />
<col width="40%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Typ</th>
<th class="head">Beschreibung</th>
<th class="head">Beispiel</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>array</td>
<td>Liste von Werten</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td>bool</td>
<td>Ja-Nein-Wert</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td>char</td>
<td>Unicode Zeichen</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td>byte</td>
<td>Integer 8 Bit</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td>datetime</td>
<td>Datumswert</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td>decimal</td>
<td>Dezimal</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td>double</td>
<td>Gleitkomma</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td>guid</td>
<td>Eindeutige Zahl</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td>hashtable</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td>int 16/32/64</td>
<td>Ganzzahl</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td>sbyte</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td>single</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td>string</td>
<td>Zeichenkette</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td>timespan</td>
<td>Zeitspanne</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td>xml</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="schleifen">
<span id="id5"></span><h2>17.7. Schleifen<a class="headerlink" href="#schleifen" title="Permalink zu dieser Überschrift">¶</a></h2>
<p>kjckjk</p>
<div class="section" id="for">
<span id="schleife-for"></span><h3>17.7.1. for<a class="headerlink" href="#for" title="Permalink zu dieser Überschrift">¶</a></h3>
<div class="highlight-sh"><div class="highlight"><pre><span class="k">for</span> <span class="o">(</span><span class="nv">$a</span> <span class="o">=</span> 1; <span class="nv">$a</span> -le 3 ; <span class="nv">$a</span>++<span class="o">)</span> <span class="o">{</span><span class="s2">&quot;hello&quot;</span><span class="o">}</span>

<span class="o">[</span>int<span class="o">]</span><span class="nv">$intPing</span> <span class="o">=</span> 10
<span class="o">[</span>string<span class="o">]</span><span class="nv">$intNetwork</span> <span class="o">=</span> <span class="s2">&quot;127.0.0.&quot;</span>

<span class="k">for</span> <span class="o">(</span><span class="nv">$i</span><span class="o">=</span>1;<span class="nv">$i</span> -le <span class="nv">$intPing</span>; <span class="nv">$i</span>++<span class="o">)</span>
<span class="o">{</span>
    <span class="nv">$strQuery</span> <span class="o">=</span> <span class="s2">&quot;select * from win32_pingstatus where address = &#39;&quot;</span> + <span class="nv">$intNetwork</span> + <span class="nv">$i</span> + <span class="s2">&quot;&#39;&quot;</span>
    <span class="nv">$wmi</span> <span class="o">=</span> get-wmiobject -query <span class="nv">$strQuery</span>
    <span class="s2">&quot;Pinging $intNetwork$i ... &quot;</span>
    <span class="k">if</span> <span class="o">(</span><span class="nv">$wmi</span>.statuscode -eq 0<span class="o">)</span>
    <span class="o">{</span>
      <span class="s2">&quot;success&quot;</span>
    <span class="o">}</span>
    <span class="k">else</span>
    <span class="o">{</span>
      <span class="s2">&quot;error: &quot;</span> + <span class="nv">$wmi</span>.statuscode + <span class="s2">&quot; occurred&quot;</span>
    <span class="o">}</span>
<span class="o">}</span>
</pre></div>
</div>
</div>
<div class="section" id="do-while">
<span id="schleife-do-while"></span><h3>17.7.2. do - while<a class="headerlink" href="#do-while" title="Permalink zu dieser Überschrift">¶</a></h3>
<div class="highlight-sh"><div class="highlight"><pre><span class="nv">$dtmTime</span> <span class="o">=</span> get-date -h 04 -mi 23 -s 00

<span class="k">do</span>
<span class="o">{</span>
     <span class="nv">$dtmCurrent</span> <span class="o">=</span> Get-Date -DisplayHint <span class="nb">time</span>
     <span class="s2">&quot;The current time is &quot;</span> + <span class="nv">$dtmCurrent</span> <span class="s2">&quot;counting to &quot;</span> + <span class="nv">$dtmtime</span>
     start-sleep -s 2
<span class="o">}</span>
<span class="k">while</span> <span class="o">(</span><span class="nv">$dtmCurrent</span> -lt <span class="nv">$dtmTime</span><span class="o">)</span>
<span class="s2">&quot;time reached Ã &quot;</span>
</pre></div>
</div>
</div>
<div class="section" id="do-until">
<span id="schleife-do-until"></span><h3>17.7.3. do - until<a class="headerlink" href="#do-until" title="Permalink zu dieser Überschrift">¶</a></h3>
<div class="highlight-sh"><div class="highlight"><pre>//Endlosschleife

<span class="nv">$strTxtFile</span> <span class="o">=</span> <span class="s2">&quot;c:\mytest\loopbackprocesses.txt&quot;</span>
<span class="nv">$i</span> <span class="o">=</span> 0
<span class="nv">$mytext</span> <span class="o">=</span> Get-Content <span class="nv">$strTxtFile</span>
<span class="k">do</span> <span class="o">{</span>
     <span class="nv">$mytext</span><span class="o">[</span><span class="nv">$i</span><span class="o">]</span>
     <span class="nv">$i</span> ++
<span class="o">}</span> <span class="k">until</span> <span class="o">(</span><span class="nv">$i</span> -eq <span class="nv">$mytext</span>.length<span class="o">)</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="auswahl">
<span id="id6"></span><h2>17.8. Auswahl<a class="headerlink" href="#auswahl" title="Permalink zu dieser Überschrift">¶</a></h2>
<div class="section" id="if-elseif">
<span id="auswahl-if-elseif-else"></span><h3>17.8.1. if-elseif<a class="headerlink" href="#if-elseif" title="Permalink zu dieser Überschrift">¶</a></h3>
<div class="highlight-sh"><div class="highlight"><pre><span class="nv">$wmi</span> <span class="o">=</span> get-wmiObject win32_processor
<span class="k">if</span> <span class="o">(</span><span class="nv">$wmi</span>.Architecture -eq 0<span class="o">)</span>
     <span class="o">{</span><span class="s2">&quot;This is an x86 computer&quot;</span><span class="o">}</span>
elseif<span class="o">(</span><span class="nv">$wmi</span>.architecture -eq 1<span class="o">)</span>
   <span class="o">{</span><span class="s2">&quot;This is an MIPS computer&quot;</span><span class="o">}</span>
elseif<span class="o">(</span><span class="nv">$wmi</span>.architecture -eq 2<span class="o">)</span>
   <span class="o">{</span><span class="s2">&quot;This is an Alapha computer&quot;</span><span class="o">}</span>
elseif<span class="o">(</span><span class="nv">$wmi</span>.architecture -eq 3<span class="o">)</span>
   <span class="o">{</span><span class="s2">&quot;This is an PowerPC computer&quot;</span><span class="o">}</span>
elseif<span class="o">(</span><span class="nv">$wmi</span>.architecture -eq 6<span class="o">)</span>
   <span class="o">{</span><span class="s2">&quot;This is an IPF computer&quot;</span><span class="o">}</span>
elseif<span class="o">(</span><span class="nv">$wmi</span>.architecture -eq 9<span class="o">)</span>
   <span class="o">{</span><span class="s2">&quot;This is an x64 computer&quot;</span><span class="o">}</span>
<span class="k">else</span>
   <span class="o">{</span><span class="nv">$wmi</span>.architecture + <span class="s2">&quot; is not a cpu type I am familiar with&quot;</span><span class="o">}</span>

<span class="s2">&quot;Current clockspeed is : &quot;</span> + <span class="nv">$wmi</span>.CurrentClockSpeed + <span class="s2">&quot; MHZ&quot;</span>
<span class="s2">&quot;Max clockspeed is : &quot;</span> + <span class="nv">$wmi</span>.MaxClockSpeed  + <span class="s2">&quot; MHZ&quot;</span>
<span class="s2">&quot;Current load percentage is: &quot;</span> + <span class="nv">$wmi</span>.LoadPercentage + <span class="s2">&quot; Percent&quot;</span>
<span class="s2">&quot;The L2 cache size is: &quot;</span> + <span class="nv">$wmi</span>.L2CacheSize + <span class="s2">&quot; KB&quot;</span>
</pre></div>
</div>
</div>
<div class="section" id="switch">
<span id="auswahl-switch"></span><h3>17.8.2. switch<a class="headerlink" href="#switch" title="Permalink zu dieser Überschrift">¶</a></h3>
<div class="highlight-sh"><div class="highlight"><pre><span class="nv">$a</span><span class="o">=</span>5;switch <span class="o">(</span><span class="nv">$a</span><span class="o">)</span> <span class="o">{</span> 4<span class="o">{</span><span class="s2">&quot;four detected&quot;</span><span class="o">}</span> 5<span class="o">{</span><span class="s2">&quot;five detected&quot;</span><span class="o">}</span> <span class="o">}</span>

<span class="nv">$wmi</span> <span class="o">=</span> get-wmiobject win32_computersystem
<span class="s2">&quot;computer &quot;</span> + <span class="nv">$wmi</span>.name + <span class="s2">&quot; is: &quot;</span>

switch <span class="o">(</span><span class="nv">$wmi</span>.domainrole<span class="o">)</span>
<span class="o">{</span>
     0 <span class="o">{</span><span class="s2">&quot;`t Stand alone workstation&quot;</span><span class="o">}</span>
     1 <span class="o">{</span><span class="s2">&quot;`t Member workstation&quot;</span><span class="o">}</span>
     2 <span class="o">{</span><span class="s2">&quot;`t Stand alone server&quot;</span><span class="o">}</span>
     3 <span class="o">{</span><span class="s2">&quot;`t Member server&quot;</span><span class="o">}</span>
     4 <span class="o">{</span><span class="s2">&quot;`t Back up domain controller&quot;</span><span class="o">}</span>
     5 <span class="o">{</span><span class="s2">&quot;`t Primary domain controller&quot;</span><span class="o">}</span>
     default <span class="o">{</span><span class="s2">&quot;`t The role can not be determined&quot;</span><span class="o">}</span>
<span class="o">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="darstellungsmoglichkeiten">
<h2>17.9. Darstellungsmöglichkeiten<a class="headerlink" href="#darstellungsmoglichkeiten" title="Permalink zu dieser Überschrift">¶</a></h2>
</div>
<div class="section" id="programmablaufplan">
<h2>17.10. Programmablaufplan<a class="headerlink" href="#programmablaufplan" title="Permalink zu dieser Überschrift">¶</a></h2>
<p>kdjfksdjf</p>
</div>
<div class="section" id="struktogramm">
<h2>17.11. Struktogramm<a class="headerlink" href="#struktogramm" title="Permalink zu dieser Überschrift">¶</a></h2>
<p class="rubric">Footnotes</p>
<table class="docutils footnote" frame="void" id="id7" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id2">[1]</a></td><td>FÃ¼r case- bzw. case-insensitive Versionen gibt es noch::
-ccontains, -icontains  -cnotcontains, -inotcontains</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="id8" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id3">[2]</a></td><td>Restwert einer Division</td></tr>
</tbody>
</table>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="Allgemeiner Index"
             >Index</a></li>
        <li class="right" >
          <a href="powershell_activedirectory.html" title="18. PowerShell für ActiveDirectory"
             >weiter</a> |</li>
        <li class="right" >
          <a href="powershell_fehlerbehandlung.html" title="16. Fehlerbehandlung"
             >zurück</a> |</li>
        <li><a href="index.html">PS4SYS</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2010, STE.
      Mit <a href="http://sphinx-doc.org/">Sphinx</a> 1.2b1 erstellt.
    </div>
  </body>
</html>